package com.example.opengl.render.rectangle

import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.base.BaseActivity
import com.example.opengl.R
import com.example.opengl.databinding.ActivityOpenglRenderRectangleBinding
import com.example.opengl.main.OpenGLPath
import com.example.opengl.render.triangle.TriangleRender

/**
 * @author: Mr.You
 * @create: 2023-07-26 15:59
 * @description:绘制正方形
 **/
@Route(path = OpenGLPath.OPENGL_RENDER_RECTANGLE)
class OpenGLRenderRectangleActivity : BaseActivity<ActivityOpenglRenderRectangleBinding>() {
    override fun getLayoutId(): Int = R.layout.activity_opengl_render_rectangle

    override fun initView() {
      mBinding.glSurface.run {
          setEGLContextClientVersion(2)
          setRenderer(TriangleRender().apply {
              addDrawerRender(RectangleDrawer())
          })

      }
    }

    override fun initListener() {

    }
}